﻿using Jy.Abp.Application;
using System;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Domain.Entities;
using Volo.Abp.Domain.Repositories;

namespace AbpProjectTemplate
{
    public class AppCrudAppService<TEntity, TKey, TEntityDto, TEntityListItem, TGetListFilter, TCreateInput, TUpdateInput>
        : Jy.Abp.Application.AppCrudAppService<TEntity, TKey, TEntityDto, TEntityListItem, TGetListFilter, TCreateInput, TUpdateInput>
           where TEntity : class, IEntity<TKey>
           where TEntityDto : IEntityDto<TKey>
           where TEntityListItem : IEntityDto<TKey>
           where TGetListFilter : PagedAndSortedFilter
        //where TUpdateInput : IEntityDto<TKey>
    {
        public AppCrudAppService(IRepository<TEntity, TKey> repository) : base(repository)
        {
        }
    }

    public class AsyncCrudAppService<TEntity, TKey, TEntityDto, TEntityListItem, TGetListFilter, EditDto>
        : Jy.Abp.Application.AppCrudAppService<TEntity, TKey, TEntityDto, TEntityListItem, TGetListFilter, EditDto, EditDto>
           where TEntity : class, IEntity<TKey>
           where TEntityDto : IEntityDto<TKey>
           where TEntityListItem : IEntityDto<TKey>
           where TGetListFilter : PagedAndSortedFilter
    {
        public AsyncCrudAppService(IRepository<TEntity, TKey> repository) : base(repository)
        {
        }
    }

    public class AsyncGuidEntityCrudAppService<TEntity, TEntityDto, TEntityListItem, TGetListFilter, EditDto>
       : Jy.Abp.Application.AsyncGuidEntityCrudAppService<TEntity, TEntityDto, TEntityListItem, TGetListFilter, EditDto>
          where TEntity : class, IEntity<Guid>
          where TEntityDto : IEntityDto<Guid>
          where TEntityListItem : IEntityDto<Guid>
          where EditDto : IEntityDto<Guid>
          where TGetListFilter : PagedAndSortedFilter
    {
        public AsyncGuidEntityCrudAppService(IRepository<TEntity, Guid> repository) : base(repository)
        {
        }
    }

    public class AsyncIntEntityCrudAppService<TEntity, TEntityDto, TEntityListItem, TGetListFilter, EditDto>
       : Jy.Abp.Application.AsyncIntEntityCrudAppService<TEntity, TEntityDto, TEntityListItem, TGetListFilter, EditDto>
          where TEntity : class, IEntity<int>
          where TEntityDto : IEntityDto<int>
          where TEntityListItem : IEntityDto<int>
          where EditDto : IEntityDto<int>
          where TGetListFilter : PagedAndSortedFilter
    {
        public AsyncIntEntityCrudAppService(IRepository<TEntity, int> repository) : base(repository)
        {
        }
    }
}